#include <iostream>

class Draw {
private:
    int height;

public:
    Draw(int height) {
        if (height <= 3) {
            std::cerr << "false" << std::endl;
        } else {
            this->height = height;
        }
    }
    void drawTriangle() const {
        for (int a = 0; a < height; a++) {
            for (int b = 0; b < height - a - 1; b++) {
                std::cout << " ";
            }
            for (int c = 0; c < 2 * a + 1; c++) {
                std::cout << "*";
            }
            std::cout << std::endl;
        }
    }
    void drawRectangle(int width) const {
        for (int a = 0; a < height; a++) {
            for (int b = 0; b < width; b++) {
                std::cout << "*";
            }
            std::cout << std::endl;
        }
    }
    void drawSquare() const {
        drawRectangle(height);
    }
    void drawParallelogram(int width) const {
        for (int a = 0; a < height; a++) {
            for (int b = 0; b < a; b++) {
                std::cout << " ";
            }
            for (int c = 0; c < width; c++) {
                std::cout << "*";
            }
            std::cout << std::endl;
        }
    }
};
int main() {
    try {
        Draw draw1(4);
        draw1.drawTriangle();
        std::cout << std::endl;
        Draw draw2(3);
        std::cout << std::endl;
        Draw draw3(5);
        draw3.drawSquare();
        std::cout << std::endl;
        Draw draw4(2);
        std::cout << std::endl;
    } catch (const std::exception& e) {
        std::cerr << "Exception: " << e.what() << std::endl;
    }
}
